package com.cencat.merchant.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 商家用户视图对象
 * @author cencat
 * @since 2024-01-01
 */
@Data
@Schema(description = "商家用户视图对象")
public class MerchantUserVO {

    @Schema(description = "用户ID", example = "1")
    private Long id;

    @Schema(description = "商家ID", example = "1")
    private Long merchantId;

    @Schema(description = "商家名称", example = "张三的小店")
    private String merchantName;

    @Schema(description = "用户名", example = "zhangsan")
    private String username;

    @Schema(description = "真实姓名", example = "张三")
    private String realName;

    @Schema(description = "邮箱", example = "zhangsan@example.com")
    private String email;

    @Schema(description = "手机号", example = "13800138000")
    private String phone;

    @Schema(description = "角色", example = "ADMIN")
    private String role;

    @Schema(description = "角色名称", example = "管理员")
    private String roleName;

    @Schema(description = "权限", example = "user:read,user:write")
    private String permissions;

    @Schema(description = "头像URL", example = "https://www.example.com/avatar.png")
    private String avatar;

    @Schema(description = "状态", example = "1")
    private Integer status;

    @Schema(description = "状态名称", example = "正常")
    private String statusName;

    @Schema(description = "是否启用", example = "true")
    private Boolean enabled;

    @Schema(description = "最后登录时间", example = "2024-01-01T10:00:00")
    private LocalDateTime lastLoginTime;

    @Schema(description = "最后登录IP", example = "192.168.1.1")
    private String lastLoginIp;

    @Schema(description = "登录次数", example = "10")
    private Integer loginCount;

    @Schema(description = "备注", example = "管理员用户")
    private String remark;

    @Schema(description = "创建时间", example = "2024-01-01T10:00:00")
    private LocalDateTime createTime;

    @Schema(description = "更新时间", example = "2024-01-01T10:00:00")
    private LocalDateTime updateTime;

    @Schema(description = "创建人ID", example = "1")
    private Long createUserId;

    @Schema(description = "创建人姓名", example = "管理员")
    private String createUserName;

    @Schema(description = "更新人ID", example = "1")
    private Long updateUserId;

    @Schema(description = "更新人姓名", example = "管理员")
    private String updateUserName;
}